<template>
  <div class="cj_dialog">
    <!-- <div class="cj_dialog" @click.self="modalClick"> -->
    <div class="container" :style="{ width, height }">
      <div class="header">
        <div class="title">
          <!-- <img src="@/assets/image/dialog/decoration.svg" alt="" /> -->
          <span>{{ title }}</span>
        </div>
        <div class="closeIcon el-icon-close" @click="$emit('update:visible', false)"></div>
      </div>
      <div class="content">
        <slot> </slot>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  name: "",
  props: {
    title: {
      type: String,
      default: "",
    },
    width: {
      type: String,
      default: "40%",
    },
    height: {
      type: String,
      default: "55%",
    },
  },
  data() {
    return {
      tabActive: {},
    };
  },
  mounted() {},
  methods: {
    modalClick() {
      this.$emit("update:visible", false);
    },
    search(condition) {
      this.$emit("search", condition);
    },
  },
};
</script>
<style lang="scss" scoped>
.cj_dialog {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 10;
  width: 100%;
  height: 100vh;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  z-index: 1000;
  .container {
    margin: auto;
    background: #fff;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    .header {
      width: 100%;
      height: 50px;
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 0 20px;
      box-sizing: border-box;
      background: #e6eaf0;
      .title {
        // height: 30px;
        color: #444444;
        display: flex;
        align-items: center;
        font-size: 20px;
        letter-spacing: 2px;
        transform: translateY(5px);
      }
      .closeIcon {
        position: relative;
        z-index: 99;
        color: #444444;
        font-weight: 600;
        padding: 5px;
        cursor: pointer;
        font-size: 22px;
        margin-top: 5px;
      }
    }

    .content {
      width: 100%;
      height: calc(100% - 50px);
      padding: 15px;
      box-sizing: border-box;
    }
  }
}
</style>
